<form method="post" action="{{ url('/database/structure') }}" name="tablesForm" id="tablesForm">
{{ get_hidden_inputs(db) }}
<div class="table-responsive">
<table class="table table-striped table-hover table-sm w-auto data">
    <thead>
        <tr>
            <th class="d-print-none"></th>
            <th>{{ sortable_table_header(t('Table'), 'table') }}</th>
            {% if replication %}
                <th>{{ t('Replication') }}</th>
            {% endif %}

            {% if db_is_system_schema %}
                {% set action_colspan = 3 %}
            {% else %}
                {% set action_colspan = 6 %}
            {% endif %}
            {% if num_favorite_tables > 0 %}
                {% set action_colspan = action_colspan + 1 %}
            {% endif %}
            <th colspan="{{ action_colspan }}" class="d-print-none">
                {{ t('Action') }}
            </th>
            {# larger values are more interesting so default sort order is DESC #}
            <th>
                {{ sortable_table_header(t('Rows'), 'records', 'DESC') }}
                {{ show_hint(t('May be approximate. Click on the number to get the exact count. See [doc@faq3-11]FAQ 3.11[/doc].')|sanitize) }}
            </th>
            {% if not (properties_num_columns > 1) %}
                <th>{{ sortable_table_header(t('Type'), 'type') }}</th>
                <th>{{ sortable_table_header(t('Collation'), 'collation') }}</th>
            {% endif %}

            {% if is_show_stats %}
                {# larger values are more interesting so default sort order is DESC #}
                <th>{{ sortable_table_header(t('Size'), 'size', 'DESC') }}</th>
                {# larger values are more interesting so default sort order is DESC #}
                <th>{{ sortable_table_header(t('Overhead'), 'overhead', 'DESC') }}</th>
            {% endif %}

            {% if show_charset %}
                <th>{{ sortable_table_header(t('Charset'), 'charset') }}</th>
            {% endif %}

            {% if show_comment %}
                <th>{{ sortable_table_header(t('Comment'), 'comment') }}</th>
            {% endif %}

            {% if show_creation %}
                {# newer values are more interesting so default sort order is DESC #}
                <th>{{ sortable_table_header(t('Creation'), 'creation', 'DESC') }}</th>
            {% endif %}

            {% if show_last_update %}
                {# newer values are more interesting so default sort order is DESC #}
                <th>{{ sortable_table_header(t('Last update'), 'last_update', 'DESC') }}</th>
            {% endif %}

            {% if show_last_check %}
                {# newer values are more interesting so default sort order is DESC #}
                <th>{{ sortable_table_header(t('Last check'), 'last_check', 'DESC') }}</th>
            {% endif %}
        </tr>
    </thead>
    <tbody>
    {% for structure_table_row in structure_table_rows %}
        {% include 'database/structure/structure_table_row.twig' with structure_table_row only %}
    {% endfor %}
    </tbody>
    {% if body_for_table_summary %}
        {% include 'database/structure/body_for_table_summary.twig' with body_for_table_summary only %}
    {% endif %}
</table>
</div>
{% if check_all_tables %}
  {% include 'database/structure/check_all_tables.twig' with check_all_tables only %}
{% endif %}
</form>
{% if check_all_tables %}
  {% include 'database/structure/bulk_action_modal.twig' with check_all_tables only %}
{% endif %}
